<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>敏感资源</title>
</head>
<body>
    <ul></ul>
    <script src="../util.js"></script>
    <script>
        var ul = document.querySelector("ul");
        //会话管理：没有登录，不允许访问
        //前端html,css,js全部开放，后端给控制起来就行
        ajax({
            method: "GET",
            url: "../sensitive",
            callback: function(status, resp){
                if(status==200){//用户已登录，显示数据
                    var body = JSON.parse(resp);
                    var content = '';
                    content += `<li>键a:${body.a}</li>`;
                    content += `<li>键b:${body.b}</li>`;
                    content += `<li>键c:${body.c}</li>`;
                    ul.innerHTML = content;
                }else{
                    alert("响应状态码："+status)
                }
            }
        })
    </script>
</body>
</html>